home *** CD-ROM | disk | FTP | other *** search
/ Computer Games 95 / Computer Games 95.iso / demos / bzone / BZDEMO.EXE / data / Collision.cfg < prev    next >
Encoding:
Text File  |  1998-05-26  |  4.0 KB  |  119 lines

  1. ///////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Collision.cfg
  4. //
  5. // This files contains runtime configuration variables for collision avoidance.
  6. //
  7. // By the Mad Dr. I
  8. //
  9. ///////////////////////////////////////////////////////////////////////////////
  10.  
  11. // Which revision of this file are we using?
  12. #define COLLISION_CONFIG_FILE_REVISION 1
  13.  
  14. // Range Search Parameters
  15. #define AVOIDANCE_USING_RANGE_SEARCH 1
  16.  
  17. // How big is a grid cell in the range search structure?
  18. #define GRID_X_SIZE 256.0
  19. #define GRID_Z_SIZE 256.0
  20.  
  21. // Which modes are on?
  22. // Any or all of the following four modes can be selected or deselected
  23. // together.
  24. // The combo most like the old avoidance is (1,0,0,0).
  25. // The one recommended by the doctor is (1,1,1,0)
  26.  
  27. // COLLISION_DIRECT_REPULSION is a repulsive force pointing directly
  28. // at one object from another.
  29. #define COLLISION_DIRECT_REPULSION 1
  30.  
  31. // COLLISION_LATERAL_REPULSION is a force which causes one object to move
  32. // laterally to take another object out of its direct path.  This keeps two
  33. // objects from being is a "standoff" facing each other trying to get by.
  34. #define COLLISION_LATERAL_REPULSION 1
  35.  
  36. // COLLISION_FULL_POTENTIAL_FIELD uses forces from all really close objects 
  37. // if its value is 1.  Otherwise, the repulsion is only from the single
  38. // closest obstacle.  This makes a noticable difference when several objects
  39. // are close together (cuts down collisions)
  40. #define COLLISION_FULL_POTENTIAL_FIELD 1
  41.  
  42. // COLLISION_REAL_COLLISIONS turns on a check (when 1) to see if two objects
  43. // really could collide given their current velocities.  If not, forces are
  44. // nott applied.  This is potentially expensive, and the parameters would need
  45. // to be tweaked carefully to avoid collisions.
  46. #define COLLISION_REAL_COLLISIONS 1
  47.  
  48. ///////////////////////////////////////////////////////////////////////////////
  49. // FOR Lateral Repulsion
  50.  
  51. // This is a modifier for the magnitude of lateral 
  52. // forces applied for avoidance
  53. #define LATERAL_AVOIDANCE_MULTIPLIER 600.0 // Was 120.0
  54.  
  55. // This is how many times bigger the danger zone for a collision
  56. // can be than the combined radius of the two objects
  57. #define LATERAL_DANGER_WIDTH 1.0
  58.  
  59.  
  60. ///////////////////////////////////////////////////////////////////////////////
  61. // FOR AIUtil_Detect_2D_Collision
  62.  
  63. // When we're looking to see if there will be a collision with an object
  64. // in some time period, what is the time we say (in seconds)
  65. #define COLLISION_LOOK_AHEAD_TIME 10.0 // Was 2.5
  66.  
  67. // When doing the Real Collision Look ahead, how much bigger than the
  68. // real radius of objects do we consider the objects to be...
  69. #define COLLISION_SAFETY_COEFF 1.2
  70.  
  71. // Should we use the cheap 2D collision or the expensive one?
  72. #define COLLISION_CHEAP_2D_COLLIDE 1
  73.  
  74. ///////////////////////////////////////////////////////////////////////////////
  75. // FOR FindPotentialField
  76.  
  77. // How much more attractive is the final goal than a waypoint?
  78. #define EXTRA_GOAL_ATTRACTION 5.0
  79.  
  80. // Simple multiplier for the effect of repulsion
  81. #define REPULSIVE_COEFFICIENT 1200.0
  82.  
  83. // Simple multiplier for effect of attraction
  84. #define ATTRACTIVE_COEFFICIENT 1.0
  85.  
  86. // By default how far away do we cut off the repulsive effect of an object
  87. // (in meters)
  88. #define DEFAULT_REPULSION_CUTOFF 40.0
  89.  
  90. // Default distance for potential field influence of repulsion
  91. #define DISTANCE_OF_INFLUENCE 30.0
  92.  
  93. ///////////////////////////////////////////////////////////////////////////////
  94. // FOR CliffForce
  95.  
  96. // Additional coefficient for cliffs' repulsive force
  97. #define CLIFF_REPULSION_COEFFICIENT 1.0 // was 3.0
  98.  
  99. ///////////////////////////////////////////////////////////////////////////////
  100. // FOR GotoTask::Goto(void)
  101.  
  102. // How close to a point on our path should we be before we start heading to
  103. // the next point
  104. #define SWITCH_TO_NEXT_POINT_DISTANCE 10.0
  105.  
  106. ///////////////////////////////////////////////////////////////////////////////
  107. // FOR UnitTask::IsStuck(void)
  108.  
  109. // Give some extra time before we call a unit stuck!
  110. #define EXTRA_STUCK_TIME 5.0
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.